import threading
import time
# def sayhi(num):
#     print('running num is %s'%num)
#     time.sleep(3)
# if __name__ == '__main__':
#     t1 = threading.Thread(target=sayhi,args=(1,))
#     t2 = threading.Thread(target=sayhi,args=(2,))
#
#     t1.start()
#     t2.start()
#
#     print(t1.getName())
#     print(t2.getName())


class MyThread(threading.Thread):
    def __init__(self,num):
        threading.Thread.__init__(self)
        self.num = num

    def run(self):
        print('running is number:%s'%self.num)
        time.sleep(3)
if __name__ == '__main__':
    t1 = MyThread(1)
    t2 = MyThread(2)
    t1.start()
    t2.start()

